-
Notifications
You must be signed in to change notification settings - Fork 267
PHPLIB-1680: Remove pre-4.2 wire version checks and test code #1801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v2.x
Are you sure you want to change the base?
Conversation
This logic appears to date back to 8abb006 and was never updated when later server versions added support on mongos.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v2.x #1801 +/- ##
============================================
- Coverage 87.72% 87.70% -0.02%
+ Complexity 3195 3185 -10
============================================
Files 424 424
Lines 6296 6289 -7
============================================
- Hits 5523 5516 -7
Misses 773 773
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
GromNaN
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an error with PHPUnit tests (ubuntu-22.04, 8.1, 6.0, sharded_cluster)
UnexpectedValueException: Could not determine server storage engine
| use MongoDB\Driver\BulkWrite; | ||
| use MongoDB\Driver\Exception\LogicException; | ||
| use MongoDB\Driver\WriteConcern; | ||
| use MongoDB\Exception\UnsupportedException; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run phpcbf.
alcaeus
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nit, and a request to run phpcbf. Changes themselves LGTM.
| /* Server versions >= 4.2.0 raise errors for unsupported update options. | ||
| * For previous versions, the CRUD spec requires a client-side error. */ | ||
| if (isset($this->options['hint']) && ! server_supports_feature($server, self::WIRE_VERSION_FOR_UNSUPPORTED_OPTION_SERVER_SIDE_ERROR)) { | ||
| throw UnsupportedException::hintNotSupported(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Is this method still used after we remove everything? Not sure if we consider this public API, but we can remove the method if we consider it private and it's no longer used.
https://jira.mongodb.org/browse/PHPLIB-1680
Supersedes #1695